
 <!DOCTYPE HTML>
<html lang="zh-Hans">
<head>
  <meta charset="UTF-8">
  <!-- Global Site Tag (gtag.js) - Google Analytics -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=UA-84488915-1"></script>
  <script>
  window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

        gtag('config', 'UA-84488915-1');
  </script>
  
    <title>linyu blog</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    
    <meta name="author" content="linyu">
    

    
    <meta property="og:type" content="website">
<meta property="og:title" content="linyu blog">
<meta property="og:url" content="http://bigsuperangel.github.io/page/2/index.html">
<meta property="og:site_name" content="linyu blog">
<meta property="og:locale" content="zh-Hans">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="linyu blog">

    
    <link rel="alternative" href="/atom.xml" title="linyu blog" type="application/atom+xml">
    
    
    <link rel="icon" href="/img/favicon.ico">
    
    
    <link rel="apple-touch-icon" href="/img/jacman.jpg">
    <link rel="apple-touch-icon-precomposed" href="/img/jacman.jpg">
    
    <link rel="stylesheet" href="/css/style.css">
</head>

  <body>
    <header>
      
<div>
		
			<div id="imglogo">
				<a href="/"><img src="/img/logo.png" alt="linyu blog" title="linyu blog"/></a>
			</div>
			
			<div id="textlogo">
				<h1 class="site-name"><a href="/" title="linyu blog">linyu blog</a></h1>
				<h2 class="blog-motto">Where there is a will,there is a way</h2>
			</div>
			<div class="navbar"><a class="navbutton navmobile" href="#" title="菜單">
			</a></div>
			<nav class="animated">
				<ul>
					<ul>
					 
						<li><a href="/">Home</a></li>
					
						<li><a href="/archives">Archives</a></li>
					
						<li><a href="/tags/linux">linux</a></li>
					
						<li><a href="/tags/java">Java</a></li>
					
					<li>
 					
					<form class="search" action="//google.com/search" method="get" accept-charset="utf-8">
						<label>Search</label>
						<input type="search" id="search" name="q" autocomplete="off" maxlength="20" placeholder="搜索" />
						<input type="hidden" name="q" value="site:bigsuperangel.github.io">
					</form>
					
					</li>
				</ul>
			</nav>			
</div>
    </header>
    <div id="container">
      <div id="main">

   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2017/03/08/virtualenv/" title="virtualenv" itemprop="url">virtualenv</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2017-03-08T06:50:24.000Z" itemprop="datePublished"> 發表於 2017-03-08</time>
    
  </p>
</header>
    <div class="article-content">
        
        <p>VirtualEnv可以方便的解决不同项目对类库的依赖问题，这里讲下windows上如何安装virtualenv。</p>
<p><strong>1. 安装 <code>virtualenv</code></strong><br><img src="http://olrtj18qs.bkt.clouddn.com/file/2017/3/5643975ae128412eaf43f35fff5c1dd7.png" alt="5643975ae128412eaf43f35fff5c1dd7.png"></p>
<p><strong>2. 为项目安装虚拟环境</strong><br><img src="http://olrtj18qs.bkt.clouddn.com/file/2017/3/e357d5fb8428418bb14f2b43ebd05dcf.png" alt="e357d5fb8428418bb14f2b43ebd05dcf.png"></p>
<p><strong>3. 启动虚拟环境中，为项目安装所需类库</strong><br>在windows中，启动虚拟环境使用命令：your_env_dir\Scripts\activate，激活虚拟环境后，在cmd窗口的命令前面将出现，表示目前处于虚拟环境中。<br><img src="http://olrtj18qs.bkt.clouddn.com/file/2017/3/77990833b53d46299e2d486bd00b460a.png" alt="77990833b53d46299e2d486bd00b460a.png"></p>
<p><strong>4. 在虚拟环境中进行开发</strong><br>A.在项目目录下，创建一个flask_demo.py的文件，用来演示用flask创建一个应用。</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">from</span> flask <span class="keyword">import</span> Flask</div><div class="line"></div><div class="line">app = Flask(__name__)</div><div class="line"></div><div class="line"><span class="meta">@app.route('/')</span></div><div class="line"><span class="function"><span class="keyword">def</span> <span class="title">hello_flask</span><span class="params">()</span>:</span></div><div class="line">  <span class="keyword">return</span> <span class="string">'hello flask!'</span></div><div class="line"></div><div class="line">    <span class="keyword">if</span> __name__ == <span class="string">'__main__'</span>:</div><div class="line">      app.run()</div></pre></td></tr></table></figure>
<p>B.在虚拟环境中执行该应用：<br><img src="http://olrtj18qs.bkt.clouddn.com/file/2017/3/d552521b25144f02bbd12a1753c954bb.png" alt="d552521b25144f02bbd12a1753c954bb.png"><br>C.在浏览器中验证该应用：<br><img src="http://olrtj18qs.bkt.clouddn.com/file/2017/3/dc3fa4e4fb7d4abcacc8744b6b81555e.png" alt="dc3fa4e4fb7d4abcacc8744b6b81555e.png"></p>
<p><strong>5. 离开虚拟环境，使用deactivate命令</strong><br><img src="http://olrtj18qs.bkt.clouddn.com/file/2017/3/820b2fa7c7554ea59d2e7b5bdb8f9704.png" alt="820b2fa7c7554ea59d2e7b5bdb8f9704.png"><br>发现命令行前面已经没有了<env></env></p>
<p><strong>6. 在系统环境中，我们并没有安装flask类库，可以对比在系统环境中和虚拟环境中的脚本运行效果：</strong><br><img src="http://olrtj18qs.bkt.clouddn.com/file/2017/3/b44caaea05fc48728b6adf1919b39b2c.png" alt="b44caaea05fc48728b6adf1919b39b2c.png"></p>
<blockquote>
<p>总结：virtualenv虚拟环境为每个项目隔离了一套运行类库，不同的项目在各自的虚拟环境中使用不同的类库，避免了将所有类库都安装到系统环境中导致的不同项目需要不同（版本）类库的问题，项目与项目之间的类库依存不再成为问题。</p>
</blockquote>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/python/">python</a><a href="/tags/virtualenv/">virtualenv</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2017/03/08/virtualenv/#comments" class="ds-thread-count comments-count-link" data-thread-key="2017/03/08/virtualenv/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2017/02/23/freenom/" title="免费顶级域名freenom使用小结" itemprop="url">免费顶级域名freenom使用小结</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2017-02-23T03:34:29.000Z" itemprop="datePublished"> 發表於 2017-02-23</time>
    
  </p>
</header>
    <div class="article-content">
        
        <h2 id="注册"><a href="#注册" class="headerlink" title="注册"></a>注册</h2><p>在网站<a href="http://www.freenom.com" target="_blank" rel="external">freenom</a>注册帐号，默认可以第三方登陆，如google,facebook</p>
<h2 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h2><p>在Management Tools 里面设置 URL Forwarding,使其转向到自己的ip<br><img src="http://olrtj18qs.bkt.clouddn.com/file/2017/2/5913bd36aa6f4b1fa5d33c047845c7dd.png" alt="Manage Domain"> </p>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/freenom/">freenom</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2017/02/23/freenom/#comments" class="ds-thread-count comments-count-link" data-thread-key="2017/02/23/freenom/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2017/02/20/vscode/" title="vscode相关配置操作小结" itemprop="url">vscode相关配置操作小结</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2017-02-20T12:26:04.000Z" itemprop="datePublished"> 發表於 2017-02-20</time>
    
  </p>
</header>
    <div class="article-content">
        
        <h2 id="1-vscode下python-print-输出乱码"><a href="#1-vscode下python-print-输出乱码" class="headerlink" title="1. vscode下python print 输出乱码"></a>1. vscode下python print 输出乱码</h2><blockquote>
<p>在task文件中加入环境变量，然后问题解决。</p>
</blockquote>
<figure class="highlight xquery"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="string">"options"</span>: &#123;</div><div class="line">  <span class="string">"env"</span>:&#123;</div><div class="line">      <span class="string">"PYTHONIOENCODING"</span>: <span class="string">"UTF-8"</span></div><div class="line">    &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h2 id="2-python-运行配置"><a href="#2-python-运行配置" class="headerlink" title="2. python 运行配置"></a>2. python 运行配置</h2><figure class="highlight json"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div></pre></td><td class="code"><pre><div class="line">&#123;</div><div class="line">    <span class="attr">"version"</span>: <span class="string">"0.1.0"</span>,</div><div class="line">    <span class="attr">"command"</span>: <span class="string">"python"</span>,</div><div class="line">    <span class="attr">"windows"</span>: &#123;</div><div class="line">        <span class="attr">"command"</span>: <span class="string">"D:\\develop\\running\\Python35\\python.exe"</span> //python的安装路径</div><div class="line">    &#125;,</div><div class="line">    <span class="attr">"isShellCommand"</span>: <span class="literal">true</span>,</div><div class="line">    <span class="attr">"args"</span>: [</div><div class="line">        <span class="string">"$&#123;file&#125;"</span></div><div class="line">    ],</div><div class="line">    <span class="attr">"showOutput"</span>: <span class="string">"always"</span>,</div><div class="line">    <span class="attr">"options"</span>: &#123;</div><div class="line">        <span class="attr">"env"</span>: &#123;</div><div class="line">            <span class="attr">"PYTHONIOENCODING"</span>: <span class="string">"UTF-8"</span></div><div class="line">        &#125;</div><div class="line">    &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/python/">python</a><a href="/tags/vscode/">vscode</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2017/02/20/vscode/#comments" class="ds-thread-count comments-count-link" data-thread-key="2017/02/20/vscode/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/09/18/ubuntu-rc/" title="Ubuntu下使用sysv-rc-conf管理服务" itemprop="url">Ubuntu下使用sysv-rc-conf管理服务</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-09-18T04:00:10.000Z" itemprop="datePublished"> 發表於 2016-09-18</time>
    
  </p>
</header>
    <div class="article-content">
        
        <h3 id="Ubuntu运行级别"><a href="#Ubuntu运行级别" class="headerlink" title="Ubuntu运行级别"></a>Ubuntu运行级别</h3><figure class="highlight basic"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line"><span class="symbol">0 </span>停机</div><div class="line"></div><div class="line"><span class="symbol">1 </span>单用户，Does <span class="keyword">not</span> configure network interfaces, start daemons, <span class="keyword">or</span> allow non-root logins</div><div class="line"></div><div class="line"><span class="symbol">2 </span>多用户，无网络连接 Does <span class="keyword">not</span> configure network interfaces <span class="keyword">or</span> start daemons</div><div class="line"></div><div class="line"><span class="symbol">3 </span>多用户，启动网络连接 Starts the <span class="keyword">system</span> normally.</div><div class="line"></div><div class="line"><span class="symbol">4 </span>用户自定义</div><div class="line"></div><div class="line"><span class="symbol">5 </span>多用户带图形界面</div><div class="line"></div><div class="line"><span class="symbol">6 </span>重启</div></pre></td></tr></table></figure>
<h3 id="以nexus为例，配置nexus开启自动启动"><a href="#以nexus为例，配置nexus开启自动启动" class="headerlink" title="以nexus为例，配置nexus开启自动启动"></a>以nexus为例，配置nexus开启自动启动</h3><figure class="highlight awk"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">cp <span class="regexp">/opt/</span>nexus<span class="regexp">/nexus-2.0.3/</span>bin<span class="regexp">/nexus /</span>etc<span class="regexp">/init.d/</span></div><div class="line">update-rc.d nexus defaults <span class="number">99</span> <span class="comment">##数字越大启动越靠后面，因为需要网络支持，所以启动靠后</span></div></pre></td></tr></table></figure>
<h3 id="sysv-rc-conf管理启动项"><a href="#sysv-rc-conf管理启动项" class="headerlink" title="sysv-rc-conf管理启动项"></a>sysv-rc-conf管理启动项</h3><figure class="highlight vim"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">sudo apt-<span class="built_in">get</span> install sysv-rc-<span class="keyword">conf</span></div><div class="line">sudo sysv-rc-<span class="keyword">conf</span></div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/ubuntu/">ubuntu</a><a href="/tags/linux/">linux</a><a href="/tags/rc/">rc</a><a href="/tags/sysv-rc-conf/">sysv-rc-conf</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/09/18/ubuntu-rc/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/09/18/ubuntu-rc/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/09/12/maven-profile/" title="使用 Maven Profile 和 Filtering 打各种环境的包" itemprop="url">使用 Maven Profile 和 Filtering 打各种环境的包</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-09-12T09:15:17.000Z" itemprop="datePublished"> 發表於 2016-09-12</time>
    
  </p>
</header>
    <div class="article-content">
        
        <p>每个项目都会有多套运行环境（开发，测试，正式等等），不同的环境配置也不尽相同（如jdbc.url)，借助Jenkins和自动部署提供的便利，我们可以把不同环境的配置文件单独抽离出来，打完包后用对应环境的配置文件替换打包后的文件，其实maven已经给我们提供了替换方案：profile + filtering</p>
<ol>
<li>配置 resource 插件，启用filtering功能并添加属性到pom:</li>
</ol>
<figure class="highlight dust"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div></pre></td><td class="code"><pre><div class="line"><span class="xml"><span class="tag">&lt;<span class="name">project</span>&gt;</span></span></div><div class="line"><span class="xml">...</span></div><div class="line"><span class="xml"><span class="tag">&lt;<span class="name">build</span>&gt;</span></span></div><div class="line"><span class="xml">    <span class="tag">&lt;<span class="name">filters</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;<span class="name">filter</span>&gt;</span>src/main/filters-$</span><span class="template-variable">&#123;active.profile&#125;</span><span class="xml">.properties<span class="tag">&lt;/<span class="name">filter</span>&gt;</span></span></div><div class="line"><span class="xml">    <span class="tag">&lt;/<span class="name">filters</span>&gt;</span></span></div><div class="line"><span class="xml">    <span class="tag">&lt;<span class="name">resources</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;<span class="name">resource</span>&gt;</span></span></div><div class="line"><span class="xml">            <span class="tag">&lt;<span class="name">directory</span>&gt;</span>src/main/resources<span class="tag">&lt;/<span class="name">directory</span>&gt;</span></span></div><div class="line"><span class="xml">                <span class="tag">&lt;<span class="name">filtering</span>&gt;</span>true<span class="tag">&lt;/<span class="name">filtering</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;/<span class="name">resource</span>&gt;</span></span></div><div class="line"><span class="xml">    <span class="tag">&lt;/<span class="name">resources</span>&gt;</span></span></div><div class="line"><span class="xml"><span class="tag">&lt;/<span class="name">build</span>&gt;</span></span></div><div class="line"><span class="xml"><span class="tag">&lt;<span class="name">profiles</span>&gt;</span></span></div><div class="line"><span class="xml">    <span class="tag">&lt;<span class="name">profile</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>dev<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;<span class="name">properties</span>&gt;</span></span></div><div class="line"><span class="xml">            <span class="tag">&lt;<span class="name">active.profile</span>&gt;</span>dev<span class="tag">&lt;/<span class="name">active.profile</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;/<span class="name">properties</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="comment">&lt;!-- 把当前profile设置为默认profile，可以同时这是多个为默认--&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;<span class="name">activation</span>&gt;</span></span></div><div class="line"><span class="xml">            <span class="tag">&lt;<span class="name">activeByDefault</span>&gt;</span>true<span class="tag">&lt;/<span class="name">activeByDefault</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;/<span class="name">activation</span>&gt;</span></span></div><div class="line"><span class="xml">    <span class="tag">&lt;/<span class="name">profile</span>&gt;</span></span></div><div class="line"><span class="xml">    <span class="tag">&lt;<span class="name">profile</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>test<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;<span class="name">properties</span>&gt;</span></span></div><div class="line"><span class="xml">            <span class="tag">&lt;<span class="name">active.profile</span>&gt;</span>test<span class="tag">&lt;/<span class="name">active.profile</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;/<span class="name">properties</span>&gt;</span></span></div><div class="line"><span class="xml">    <span class="tag">&lt;/<span class="name">profile</span>&gt;</span></span></div><div class="line"><span class="xml">    <span class="tag">&lt;<span class="name">profile</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>product<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;<span class="name">properties</span>&gt;</span></span></div><div class="line"><span class="xml">            <span class="tag">&lt;<span class="name">active.profile</span>&gt;</span>product<span class="tag">&lt;/<span class="name">active.profile</span>&gt;</span></span></div><div class="line"><span class="xml">        <span class="tag">&lt;/<span class="name">properties</span>&gt;</span></span></div><div class="line"><span class="xml">    <span class="tag">&lt;/<span class="name">profile</span>&gt;</span></span></div><div class="line"><span class="xml">...</span></div><div class="line"><span class="xml"><span class="tag">&lt;/<span class="name">project</span>&gt;</span></span></div></pre></td></tr></table></figure>
<ol>
<li>然后在src/main下新建三个文件：filters-dev.properties,filters-test.properties,filters-product.properties,文件内容如下（以filters-dev.properties为例):</li>
</ol>
<figure class="highlight stylus"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">pom<span class="selector-class">.jdbc</span><span class="selector-class">.url</span>=jdbc:mysql:<span class="comment">//127.0.0.1:3306/dev</span></div><div class="line">pom<span class="selector-class">.jdbc</span><span class="selector-class">.username</span>=root</div><div class="line">pom<span class="selector-class">.jdbc</span><span class="selector-class">.password</span>=<span class="number">123456</span></div></pre></td></tr></table></figure>
<ol>
<li>用 dev profile 打开发包mvn clean package -Pdev, 打包后jdbc.properties文件内容如下：</li>
</ol>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">jdbc.<span class="attribute">url</span>=jdbc:mysql://127.0.0.1:3306/dev</div><div class="line">jdbc.<span class="attribute">username</span>=root</div><div class="line">jdbc.<span class="attribute">password</span>=123456</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/java/">java</a><a href="/tags/maven/">maven</a><a href="/tags/profile/">profile</a><a href="/tags/package/">package</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/09/12/maven-profile/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/09/12/maven-profile/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/08/24/maven-command/" title="maven 相关命令" itemprop="url">maven 相关命令</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-08-24T03:27:37.000Z" itemprop="datePublished"> 發表於 2016-08-24</time>
    
  </p>
</header>
    <div class="article-content">
        
        <figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div></pre></td><td class="code"><pre><div class="line"><span class="comment">##　You will need somewhere for your project to reside, create a directory somewhere and start a shell in that directory. On your command line, execute the following Maven goal:</span></div><div class="line"></div><div class="line">mvn archetype:generate <span class="attribute">-DgroupId</span>=com.mycompany.app <span class="attribute">-DartifactId</span>=my-app <span class="attribute">-DarchetypeArtifactId</span>=maven-archetype-quickstart <span class="attribute">-DinteractiveMode</span>=<span class="literal">false</span></div><div class="line"></div><div class="line"><span class="comment">##　You may test the newly compiled and packaged JAR with the following command:</span></div><div class="line">java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App</div><div class="line"></div><div class="line"><span class="comment">##　ignore test</span></div><div class="line">mvn install -Dmaven.test.<span class="attribute">skip</span>=<span class="literal">true</span></div><div class="line"></div><div class="line">mvn dependency:tree</div><div class="line">mvn install -X</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/java/">java</a><a href="/tags/maven/">maven</a><a href="/tags/command/">command</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/08/24/maven-command/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/08/24/maven-command/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/08/08/maven-jar/" title="maven打包jar" itemprop="url">maven打包jar</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-08-08T05:31:43.000Z" itemprop="datePublished"> 發表於 2016-08-08</time>
    
  </p>
</header>
    <div class="article-content">
        
        <pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
    &lt;version&gt;2.4.1&lt;/version&gt;
    &lt;executions&gt;
        &lt;execution&gt;
            &lt;phase&gt;package&lt;/phase&gt;
            &lt;goals&gt;
                &lt;goal&gt;shade&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;configuration&gt;
                &lt;transformers&gt;
                    &lt;transformer implementation=&quot;org.apache.maven.plugins.shade.resource.ManifestResourceTransformer&quot;&gt;
                        &lt;mainClass&gt;xxx.xxx.Main&lt;/mainClass&gt;
                    &lt;/transformer&gt;
                &lt;/transformers&gt;
                &lt;filters&gt;
                    &lt;filter&gt;
                        &lt;artifact&gt;*:*&lt;/artifact&gt;
                        &lt;excludes&gt;
                            &lt;exclude&gt;META-INF/*.SF&lt;/exclude&gt;
                            &lt;exclude&gt;META-INF/*.DSA&lt;/exclude&gt;
                            &lt;exclude&gt;META-INF/*.RSA&lt;/exclude&gt;
                        &lt;/excludes&gt;
                    &lt;/filter&gt;
                &lt;/filters&gt;
            &lt;/configuration&gt;
        &lt;/execution&gt;
    &lt;/executions&gt;
&lt;/plugin&gt;
</code></pre>
        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/java/">java</a><a href="/tags/maven/">maven</a><a href="/tags/maven-shade-plugin/">maven-shade-plugin</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/08/08/maven-jar/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/08/08/maven-jar/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/08/08/git-proxy/" title="git设置和取消代理" itemprop="url">git设置和取消代理</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-08-08T03:37:49.000Z" itemprop="datePublished"> 發表於 2016-08-08</time>
    
  </p>
</header>
    <div class="article-content">
        
        <figure class="highlight verilog"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div></pre></td><td class="code"><pre><div class="line">git <span class="keyword">config</span> --<span class="keyword">global</span> https<span class="variable">.proxy</span> http:<span class="comment">//127.0.0.1:1080</span></div><div class="line"></div><div class="line">git <span class="keyword">config</span> --<span class="keyword">global</span> https<span class="variable">.proxy</span> https:<span class="comment">//127.0.0.1:1080</span></div><div class="line"></div><div class="line">git <span class="keyword">config</span> --<span class="keyword">global</span> --unset http<span class="variable">.proxy</span></div><div class="line"></div><div class="line">git <span class="keyword">config</span> --<span class="keyword">global</span> --unset https<span class="variable">.proxy</span></div><div class="line"></div><div class="line">npm <span class="keyword">config</span> delete proxy</div><div class="line"></div><div class="line">git <span class="keyword">config</span> --<span class="keyword">global</span> http<span class="variable">.proxy</span> 'socks5:<span class="comment">//127.0.0.1:1080' </span></div><div class="line">git <span class="keyword">config</span> --<span class="keyword">global</span> https<span class="variable">.proxy</span> 'socks5:<span class="comment">//127.0.0.1:1080'</span></div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/git/">git</a><a href="/tags/proxy/">proxy</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/08/08/git-proxy/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/08/08/git-proxy/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/08/05/java-ignore/" title="java工程ignore文件　" itemprop="url">java工程ignore文件　</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-08-05T06:36:08.000Z" itemprop="datePublished"> 發表於 2016-08-05</time>
    
  </p>
</header>
    <div class="article-content">
        
        <figure class="highlight clean"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div></pre></td><td class="code"><pre><div class="line">########## maven</div><div class="line">target/</div><div class="line">pom.xml.tag</div><div class="line">pom.xml.releaseBackup</div><div class="line">pom.xml.versionsBackup</div><div class="line">pom.xml.next</div><div class="line">release.properties</div><div class="line">dependency-reduced-pom.xml</div><div class="line">buildNumber.properties</div><div class="line">.mvn/timing.properties</div><div class="line"></div><div class="line">########## eclipse</div><div class="line">.metadata</div><div class="line">bin/</div><div class="line">tmp/</div><div class="line">*.tmp</div><div class="line">*.bak</div><div class="line">*.swp</div><div class="line">*~.nib</div><div class="line">local.properties</div><div class="line">.settings/</div><div class="line">.loadpath</div><div class="line">.recommenders</div><div class="line"></div><div class="line"># Eclipse Core</div><div class="line">.project</div><div class="line"></div><div class="line"># External tool builders</div><div class="line">.externalToolBuilders/</div><div class="line"></div><div class="line"># Locally stored <span class="string">"Eclipse launch configurations"</span></div><div class="line">*.launch</div><div class="line"></div><div class="line"># PyDev specific (Python IDE for Eclipse)</div><div class="line">*.pydevproject</div><div class="line"></div><div class="line"># CDT-specific (C/C++ Development Tooling)</div><div class="line">.cproject</div><div class="line"></div><div class="line"># JDT-specific (Eclipse Java Development Tools)</div><div class="line">.classpath</div><div class="line"></div><div class="line"># Java annotation processor (APT)</div><div class="line">.factorypath</div><div class="line"></div><div class="line"># PDT-specific (PHP Development Tools)</div><div class="line">.buildpath</div><div class="line"></div><div class="line"># sbteclipse plugin</div><div class="line">.target</div><div class="line"></div><div class="line"># Tern plugin</div><div class="line">.tern-project</div><div class="line"></div><div class="line"># TeXlipse plugin</div><div class="line">.texlipse</div><div class="line"></div><div class="line"># STS (Spring Tool Suite)</div><div class="line">.springBeans</div><div class="line"></div><div class="line"># Code Recommenders</div><div class="line">.recommenders/</div><div class="line"></div><div class="line">################## Intellij</div><div class="line">.idea/</div><div class="line">*.iml</div><div class="line">*.iws</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/java/">java</a><a href="/tags/maven/">maven</a><a href="/tags/ignore/">ignore</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/08/05/java-ignore/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/08/05/java-ignore/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/08/04/maven-nexus/" title="maven 私服 nexus 搭建" itemprop="url">maven 私服 nexus 搭建</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-08-04T02:38:08.000Z" itemprop="datePublished"> 發表於 2016-08-04</time>
    
  </p>
</header>
    <div class="article-content">
        
        <ol>
<li><p>安装<a href="http://www.sonatype.com/download-oss-sonatype" target="_blank" rel="external">nexus</a>,可下载sh版，直接运行可根据提示完成配置，适合初学者</p>
</li>
<li><p>配置maven中settings.xml文件的servers节点，可以发布jar包到nexus</p>
 <server><br>   <id>nexus-releases</id><br>   <username>admin</username><br>   <password>admin123</password><br> </server>

 <server><br>   <id>nexus-snapshots</id><br>   <username>admin</username><br>   <password>admin123</password><br> </server>

</li>
</ol>
<p>３. 配置pom.xml文件</p>
<pre><code>&lt;repositories&gt;
    &lt;!-- 私服 --&gt;
    &lt;repository&gt;
        &lt;id&gt;nexus-repos&lt;/id&gt;
        &lt;name&gt;maven-public&lt;/name&gt;
        &lt;url&gt;http://192.168.0.114:8081/repository/maven-public/&lt;/url&gt;
        &lt;snapshots&gt;
            &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/snapshots&gt;
        &lt;releases&gt;
            &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/releases&gt;
    &lt;/repository&gt;

&lt;/repositories&gt;

&lt;pluginRepositories&gt;
    &lt;pluginRepository&gt;
        &lt;id&gt;nexus-repos&lt;/id&gt;
        &lt;name&gt;maven-public&lt;/name&gt;
        &lt;url&gt;http://192.168.0.114:8081/repository/maven-public/&lt;/url&gt;
        &lt;releases&gt;
            &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/releases&gt;
        &lt;snapshots&gt;
            &lt;enabled&gt;false&lt;/enabled&gt;
        &lt;/snapshots&gt;
    &lt;/pluginRepository&gt;
&lt;/pluginRepositories&gt;

&lt;distributionManagement&gt;
    &lt;repository&gt;
        &lt;id&gt;nexus-releases&lt;/id&gt;
        &lt;name&gt;maven-releases&lt;/name&gt;
        &lt;url&gt;http://192.168.0.114:8081/repository/maven-releases/&lt;/url&gt;
    &lt;/repository&gt;
    &lt;snapshotRepository&gt;
        &lt;id&gt;nexus-snapshots&lt;/id&gt;
        &lt;name&gt;maven-snapshots&lt;/name&gt;
        &lt;url&gt;http://192.168.0.114:8081/repository/maven-snapshots/&lt;/url&gt;
    &lt;/snapshotRepository&gt;
&lt;/distributionManagement&gt;
</code></pre>
        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/java/">java</a><a href="/tags/maven/">maven</a><a href="/tags/nexus/">nexus</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/08/04/maven-nexus/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/08/04/maven-nexus/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>







  <nav id="page-nav" class="clearfix">
    <a class="extend prev" rel="prev" href="/"><span></span>Prev</a><a class="page-number" href="/">1</a><span class="page-number current">2</span><a class="page-number" href="/page/3/">3</a><a class="page-number" href="/page/4/">4</a><span class="space">&hellip;</span><a class="page-number" href="/page/6/">6</a><a class="extend next" rel="next" href="/page/3/">Next<span></span></a>
  </nav>

</div>
      <div class="openaside"><a class="navbutton" href="#" title="顯示側邊欄"></a></div>

<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="隱藏側邊欄"></a></div>
<aside class="clearfix">

  
<div class="github-card">
<p class="asidetitle">Github 名片</p>
<div class="github-card" data-github="bigsuperangel" data-width="220" data-height="119" data-theme="medium">
<script type="text/javascript" src="//cdn.jsdelivr.net/github-cards/latest/widget.js" ></script>
</div>
  </div>



  

  
<div class="tagslist">
	<p class="asidetitle">標簽</p>
		<ul class="clearfix">
		
			
				<li><a href="/tags/linux/" title="linux">linux<sup>16</sup></a></li>
			
		
			
				<li><a href="/tags/ubuntu/" title="ubuntu">ubuntu<sup>11</sup></a></li>
			
		
			
				<li><a href="/tags/java/" title="java">java<sup>10</sup></a></li>
			
		
			
				<li><a href="/tags/maven/" title="maven">maven<sup>7</sup></a></li>
			
		
			
				<li><a href="/tags/mysql/" title="mysql">mysql<sup>4</sup></a></li>
			
		
			
				<li><a href="/tags/python/" title="python">python<sup>3</sup></a></li>
			
		
			
				<li><a href="/tags/tomcat/" title="tomcat">tomcat<sup>3</sup></a></li>
			
		
			
				<li><a href="/tags/alsamixer/" title="alsamixer">alsamixer<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/git/" title="git">git<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/hexo/" title="hexo">hexo<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/command/" title="command">command<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/eclipse/" title="eclipse">eclipse<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/doc命令/" title="doc命令">doc命令<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/database/" title="database">database<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/nodejs/" title="nodejs">nodejs<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/freenom/" title="freenom">freenom<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/gradle/" title="gradle">gradle<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/ignore/" title="ignore">ignore<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/security/" title="security">security<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/jitpack/" title="jitpack">jitpack<sup>1</sup></a></li>
			
		
		</ul>
</div>


  <div class="linkslist">
  <p class="asidetitle">友情鏈接</p>
    <ul>
        
          <li>
            
            	<a href="https://www.oschina.net" target="_blank" title="开源中国">开源中国</a>
            
          </li>
        
          <li>
            
            	<a href="http://stackoverflow.com" target="_blank" title="stackoverflow">stackoverflow</a>
            
          </li>
        
    </ul>
</div>

  


  <div class="rsspart">
	<a href="/atom.xml" target="_blank" title="rss">RSS 訂閱</a>
</div>

  <div class="weiboshow">
  <p class="asidetitle">新浪微博</p>
    <iframe width="100%" height="119" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=119&fansRow=2&ptype=1&speed=0&skin=9&isTitle=1&noborder=1&isWeibo=0&isFans=0&uid=null&verifier=&dpc=1"></iframe>
</div>


</aside>
</div>
    </div>
    <footer><div id="footer" >
	
	<div class="line">
		<span></span>
		<div class="author"></div>
	</div>
	
	
	<section class="info">
		<p> 知行合一 <br/>
			This is my blog,believe it or not.</p>
	</section>
	 
	<div class="social-font" class="clearfix">
		
		
		<a href="https://github.com/bigsuperangel" target="_blank" class="icon-github" title="github"></a>
		
		
		
		
		
		
		
		
		
		<a href="mailto:bigsuperangel@gmail.com" target="_blank" class="icon-email" title="Email Me"></a>
		
	</div>
			
		

		<p class="copyright">
		Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/wuchong/jacman" target="_blank" title="Jacman">Jacman</a> © 2019 
		
		<a href="/about" target="_blank" title="linyu">linyu</a>
		
		
		</p>
</div>
</footer>
    <script src="/js/jquery-2.0.3.min.js"></script>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>
<script src="/js/jquery.qrcode-0.12.0.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){ 
  $('.navbar').click(function(){
    $('header nav').toggleClass('shownav');
  });
  var myWidth = 0;
  function getSize(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
  };
  var m = $('#main'),
      a = $('#asidepart'),
      c = $('.closeaside'),
      o = $('.openaside');
  c.click(function(){
    a.addClass('fadeOut').css('display', 'none');
    o.css('display', 'block').addClass('fadeIn');
    m.addClass('moveMain');
  });
  o.click(function(){
    o.css('display', 'none').removeClass('beforeFadeIn');
    a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');      
    m.removeClass('moveMain');
  });
  $(window).scroll(function(){
    o.css("top",Math.max(80,260-$(this).scrollTop()));
  });
  
  $(window).resize(function(){
    getSize(); 
    if (myWidth >= 1024) {
      $('header nav').removeClass('shownav');
    }else{
      m.removeClass('moveMain');
      a.css('display', 'block').removeClass('fadeOut');
      o.css('display', 'none');
        
    }
  });
});
</script>










<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.article-content').each(function(i){
    $(this).find('img').each(function(){
      if ($(this).parent().hasClass('fancybox')) return;
      var alt = this.alt;
      if (alt) $(this).after('<span class="caption">' + alt + '</span>');
      $(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
    });
    $(this).find('.fancybox').each(function(){
      $(this).attr('rel', 'article' + i);
    });
  });
  if($.fancybox){
    $('.fancybox').fancybox();
  }
}); 
</script>



<!-- Analytics Begin -->

<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-84488915-1', 'bigsuperangel.github.io');  
ga('send', 'pageview');
</script>





<!-- Analytics End -->

<!-- Totop Begin -->

	<div id="totop">
	<a title="返回頂部"><img src="/img/scrollup.png"/></a>
	</div>
	<script src="/js/totop.js"></script>

<!-- Totop End -->

<!-- MathJax Begin -->
<!-- mathjax config similar to math.stackexchange -->


<!-- MathJax End -->

<!-- Tiny_search Begin -->

<!-- Tiny_search End -->

  </body>
 </html>
